Skip to content

Conversation

@ahmadbilaldev
Copy link
Contributor

@ahmadbilaldev ahmadbilaldev commented Oct 11, 2024

This PR adds all docs (.md and .mdx files) in /docs folder to Langbase memory. It uses the auto-sync git memory of BaseAI.

I have setup BaseAI and initially deployed all docs inside /docs folder (492 .md and .mdx files) to sourcegraph/docs memory on Langbase. You can view this memory inside Sourcegraph memories on Langbase.

How to update Sourcegraph docs memory

The memory can by synced with the latest docs changes anytime by running the following commands:

Step 1: Authenticate

First, authenticate with the Sourcegraph organization on Langbase. This step only needs to be done once and you will be authenticated for future use.

# In root folder of sourcegraph/docs repo
npx baseai@latest auth

Step 2: Deploy

Whenever you have changes in the docs and want to update the memory, run the following command:

# Deploy the latest docs to Langbase memory
npx baseai@latest deploy -m docs

BaseAI will automatically detect and update only the files that have changed. Your memory will now be up to date.

How it works

After deployment, BaseAI stores the current commit hash in the baseai/memory/docs/index.ts file to keep track of changes. The next time you deploy, BaseAI will use this hash to detect new changes. Be sure not to manually modify or delete the commit hash.

Read more

Follow the BaseAI docs for more details:

@vercel
Copy link

vercel bot commented Oct 11, 2024

@ahmadbilaldev is attempting to deploy a commit to the Sourcegraph Team on Vercel.

A member of the Team first needs to authorize it.

@ahmadbilaldev ahmadbilaldev changed the title Add auto-synced Langbase Memory for docs Add Auto-synced Langbase Memory for docs Oct 11, 2024
@vercel
Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sourcegraph-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 8:23pm

Copy link
Contributor

@MaedahBatool MaedahBatool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM let's merge it.

@MaedahBatool MaedahBatool merged commit cac552b into sourcegraph:main Oct 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants